package com.atmilan.quartz.model.dto.paolo;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 功能描述: paolo商品映射对象
 *
 * @Author: wangzh
 * @Date: 2023/2/8 17:29
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class PaoloProductResDTO {

    @ApiModelProperty("商品数据")
    @JsonProperty(value = "data")
    private List<PaoloGoodsRes> products;

    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class PaoloGoodsRes {
        @JsonProperty("productID")
        @ApiModelProperty("商品id")
        private Integer productId;

        @JsonProperty("clientProductID")
        @ApiModelProperty("WMS/ERP系统的原始产品标识")
        private Integer clientProductId;

        @JsonProperty("spu")
        @ApiModelProperty("型号代码")
        private String spu;

        @JsonProperty("sku")
        @ApiModelProperty("型号 + 颜色代码")
        private String sku;

        @JsonProperty("brand")
        @ApiModelProperty("品牌名")
        private String brand;

        @JsonProperty("name")
        @ApiModelProperty("商品名称")
        private String name;

        @JsonProperty("description")
        @ApiModelProperty("商品描述")
        private String description;

        @JsonProperty("genre")
        @ApiModelProperty("产品类型")
        private String genre;

        @JsonProperty("type")
        @ApiModelProperty("产品类型")
        private String type;

        @JsonProperty("category")
        @ApiModelProperty("产品类别")
        private String category;

        @JsonProperty("season")
        @ApiModelProperty("季节")
        private String season;

        @JsonProperty("isCarryOver")
        @ApiModelProperty("是否常规款")
        private Boolean isCarryOver;

        @JsonProperty("color")
        @ApiModelProperty("颜色")
        private String color;

        @JsonProperty("composition")
        @ApiModelProperty("成分")
        private String composition;

        @JsonProperty("madeIn")
        @ApiModelProperty("产地")
        private String madeIn;

        @JsonProperty("sizeAndFit")
        @ApiModelProperty("商品尺寸和合身说明")
        private String sizeAndFit;

        @JsonProperty("retailPrice")
        @ApiModelProperty("零售价(欧元)")
        private BigDecimal retailPrice;

        @JsonProperty("price")
        @ApiModelProperty("价格(欧元)")
        private BigDecimal price;

        @JsonProperty("pricesIncludeVat")
        @ApiModelProperty("价格是否包含增值税")
        private String priceIncludeVat;

        @JsonProperty("productLastUpdated")
        @ApiModelProperty("商品最后更新时间")
        private Date productLastUpdated;

        @JsonProperty("sizeType")
        @ApiModelProperty("产品尺寸类型")
        private String sizeType;

        @JsonProperty("photos")
        @ApiModelProperty("商品描述图片")
        private List<String> photos;

        @JsonProperty("sizes")
        @ApiModelProperty("产品现有规格")
        private List<PaoloSku> sizes;

        @Data
        @JsonIgnoreProperties(ignoreUnknown = true)
        public static class PaoloSku {
            @JsonProperty("size")
            @ApiModelProperty("尺码")
            private String size;

            @JsonProperty("stock")
            @ApiModelProperty("库存")
            private Integer stock;

            @JsonProperty("retailPrice")
            @ApiModelProperty("零售价")
            private BigDecimal retailPrice;

            @JsonProperty("price")
            @ApiModelProperty("价格")
            private BigDecimal price;

            @JsonProperty("gtin")
            @ApiModelProperty("产品大小 GTIN/EAN 条形码")
            private String gtin;
        }
    }
}
